#! /usr/bin/env python
#coding=utf-8
import rospy
from plumbing_server_client.srv import *
import sys

if __name__ == "__main__":

    if len(sys.argv) != 3:
        rospy.logerr("传入参数个数不对")
        sys.exit(1)
        

    rospy.init_node("yingyingying")

    client = rospy.ServiceProxy("addInts", AddInts)

    num1 = int(sys.argv[1])
    num2 = int(sys.argv[2])
   # client.wait_for_service()
    rospy.wait_for_service("addInts")
    response = client.call(num1, num2)

    rospy.loginfo("response : %d", response.sum)
